import { draw } from "../../utils/api";
Page({
  data: {
    info: {},
  },
  onLoad() {
    const eventChannel = this.getOpenerEventChannel();
    eventChannel.on("successEvt", (info) => {
      this.setData({
        info,
      });
    });
  },
  to_award() {
    draw({
      data: {
        beauty: this.data.info.Beauty,
      },
      success: (result) => {
        console.log(result.data.prizeid);
        wx.navigateTo({
          url: "/pages/award/award",
        });
      },
    });
  },
});
